home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
64'er
/
64ER_CD.iso
/
sh3x
/
sh34b.d64
/
spg_demo char-ed
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
1995-03-30
|
5KB
|
183 lines
10 IFPEEK(49234)<>ASC("S")THENLOAD"SPG.OBJ",8,1
20 SYS49152
100 MM=0
105 !FD 0,126,254,130,130,130,130,130,254,0
110 !FD 0,127,254,254,254,254,254,254,254,0
120 !BC 190,191
125 T%(0)=128:FORI=1TO7:T%(I)=T%(I-1)/2:NEXT
130 PRINT"[147][142][154]";:POKE53280,6:POKE53281,6
140 !GR0;GN0;GE
150 FORI=0TO24:READJ:!MB0,I,J:NEXT
160 DATA 127,0,0,126,0,0,124,0,0,126,0,0,127,0,0,111,128,0,71,192,0,3,128,0,1
170 FORI=0TO24:READJ:!MB1,I,J:NEXT
175 DATA 127,0,0,66,0,0,68,0,0,66,0,0,81,0,0,104,128,0,68,64,0,2,128,0,1
180 FORI=0TO23:READJ:!MB2,I,J:NEXT
185 DATA 255,0,0,255,0,0,255,0,0,255,0,0,255,0,0,255,0,0,255,0,0,255,0,0,255,0,0
190 :
200 PRINT"[147][155] [164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164]"
210 PRINT" *** [160]C64 CHARACTER-SET EDITOR [160]*** [160][154]"
220 !TF4,3,8,8,126;TC4,3,8,8,14
225 !ML1,2;MC1,11;MP1,1,0,0,0;MO1,1
228 PRINT
230 PRINT,,"EDIT","LOAD"
232 PRINT,,"CLEAR","SAVE"
234 PRINT,,"MIRROR","REBOOT"
236 PRINT,,"TURN","REVERS"
238 PRINT,,"ROTATE","COPY"
240 PRINT,,"AUTOREV","EXIT"
250 FORI=0TO7:FORJ=0TO31:!TF4+J,13+I,1,1,32*I+J:NEXTJ,I:!TC4,13,32,8,14
260 M1=0:M2=0:CH=0:DIM CC(7)
270 :
300 BA=13*4096+8*CH:!TC4,13,32,8,14:!TC4+(CHAND31),13+CH/32,1,1,15
301 !MX1,8*(7+(CHAND31)),154+8*INT(CH/32)
310 PRINT"[154]";:FORJ=0TO7:!BP4,3+J,BA+J:CC(J)=PEEK(1024):NEXT
320 !TC20,4,20,7,14;TC20+10*M2,4+M1,10,1,15
325 GOSUB50000
330 IFPY>12THEN500
340 IF(PX>3)AND(PX<12)AND(PY>2)AND(PY<11)THEN1000
350 IF(PX>19)AND(PY>3)AND(PY<10)THEN400
360 GOTO325
400 M2=-(PX>29):M1=PY-4
405 IFM2=0THEN320
410 ONM1+1GOTO900,800,460,320,320,420
420 !PT40960: REM EXIT
430 !TP10,8,"[159][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184]"
432 !TP10,9," DO YOU REALLY WANT "
434 !TP10,10," TO EXIT ?[160] "
440 GOSUB50300:IFYNTHEN:!FO:END
450 !RT40960:M1=0:M2=0:GOTO320
460 !PT40960: REM REBOOT
470 !TP10,8,"[159][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184]"
472 !TP10,9," DO YOU REALLY WANT "
474 !TP10,10," TO REBOOT ? "
480 GOSUB50300:IFYNTHENRUN
490 !RT40960:M1=0:M2=0:GOTO320
500 REM SELECT CHARACTERS
510 IF(PX<4)OR(PX>35)OR(PY>20)THEN325
520 CH=32*(PY-13)+PX-4:GOTO300
800 !PT40960: REM SAVE
810 !TP10,8,"[159][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184]"
820 !TP10,9," SAVE CHARACTER-SET "
830 !TP10,10,"[192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192]"
840 GOSUB50400:IFCN$=""THEN490
850 !FS0,CN$,8:GOSUB50600:!MO1,1:GOTO490
900 !PT40960: REM LOAD
910 !TP10,8,"[159][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184]"
920 !TP10,9," LOAD CHARACTER-SET "
930 !TP10,10,"[192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192]"
940 GOSUB50400:IFCN$=""THEN490
950 !FL0,CN$,8:GOSUB50600:!MO1,1:GOTO490
1000 SX=PX-4:SY=PY-3:K=CC(SY):ONM2+1GOTO1010,1020
1010 ONM1+1GOTO1100,1200,1400,1300,1500,1600
1020 ONM1+1GOTO1700,1800,100,1900,2000
1100 REM EDIT
1110 IFKANDT%(SX)THEN1130
1120 CC(SY)=KORT%(SX):GOSUB50100:GOTO1140
1130 CC(SY)=KAND(255-T%(SX)):GOSUB50100
1140 PRINT"[154]";:!BB4,PY,CC(SY):GOTO325
1200 REM CLEAR
1210 FORI=0TO7:CC(I)=0:NEXT:GOSUB50100:GOTO300
1300 REM TURN
1310 GOSUB50200
1320 ONIGOTO1350,1330,1310,1310,300
1330 !MC0,0
1332 FORI=0TO7:CD(7-I)=0:FORJ=0TO7:IFCC(J)ANDT%(I)THENCD(7-I)=CD(7-I)ORT%(J)
1340 NEXT:NEXT:GOTO1370
1350 !MC0,0
1352 FORI=0TO7:CD(I)=0:FORJ=0TO7:IFCC(J)ANDT%(I)THENCD(I)=CD(I)ORT%(7-J)
1360 NEXT:NEXT
1370 FORI=0TO7:CC(I)=CD(I):NEXT:GOSUB50100
1380 FORJ=0TO7:!BP4,3+J,BA+J:NEXT:!MC0,15:GOTO1310
1400 REM MIRROR
1410 GOSUB50200
1420 ONIGOTO1430,1430,1450,1450,300
1430 !MC0,0
1432 FORI=0TO7:CD=0:FORJ=0TO7:IFCC(I)ANDT%(J)THENCD=CDORT%(7-J)
1440 NEXT:CC(I)=CD:NEXT:GOTO1480
1450 !MC0,0
1452 FORI=0TO7:CD(I)=CC(7-I):NEXT
1470 FORI=0TO7:CC(I)=CD(I):NEXT
1480 GOSUB50100:FORJ=0TO7:!BP4,3+J,BA+J:NEXT:!MC0,15:GOTO1410
1500 REM ROTATE
1510 GOSUB50200:IFI=5THEN300
1520 !MC0,0:ONIGOTO1530,1540,1550,1560
1530 FORI=0TO7:CC(I)=255AND(CC(I)/2):NEXT:GOTO1570
1540 FORI=0TO7:CC(I)=255AND(CC(I)*2):NEXT:GOTO1570
1550 FORI=0TO6:CC(7-I)=CC(6-I):NEXT:CC(0)=0:GOTO1570
1560 FORI=0TO6:CC(I)=CC(I+1):NEXT:CC(7)=0
1570 GOSUB50100
1580 FORJ=0TO7:!BP4,3+J,BA+J:NEXT:!MC0,15:GOTO1510
1600 REM AUTOREV
1610 !RG1,53248;GK1,2,3;GN2;GI;PG2,60416;PG1,53248:GOTO300
1900 REM REVERS
1910 FORI=0TO7:CC(I)=255-CC(I):NEXT:GOSUB50100:GOTO300
2000 REM COPY
2010 !MC0,7:MM=1:GOSUB50000:IF(PX<4)OR(PX>35)OR(PY>20)OR(PY<13)THEN2010
2020 !MC0,15:MM=0:CH=32*(PY-13)+PX-4
2030 GOSUB50100:GOTO300
50000 REM MAUS-SELECT-ROUTINE
50010 !MO0,1;ML0,0+MM;MX0,27+8*PX,53+8*PY
50020 IFPEEK(198)=0THEN:!JS:GOTO50020
50030 GETI$:IFI$=CHR$(13)THEN:!ML0,1:RETURN
50040 IFI$="[145]"THENIFPY>0THENPY=PY-1
50050 IFI$=""THENIFPX<39THENPX=PX+1
50060 IFI$=""THENIFPY<24THENPY=PY+1
50070 IFI$="[157]"THENIFPX>0THENPX=PX-1
50080 GOTO50010
50100 REM STORAGE-CHARACTER
50110 FORJ=0TO7:!FB0,CH,J,CC(J):NEXT:RETURN
50200 REM WARTEN AUF CURSOR-TASTE
50210 IFPEEK(198)=0THEN:!JS:GOTO50210
50220 GETI$:I=1
50230 IFI$<>MID$("[157][145]"+CHR$(13),I,1)THENI=I+1:IFI<6THEN50230
50240 IFI=6THEN50210
50250 RETURN
50300 REM NUR YES ODER NO
50310 !TP10,11," [185][185][185][185][185] [185][185][185][185] "
50320 !TP10,12," [146] YES [146] NO "
50330 !TP10,13," [184][184][184][184][184] [184][184][184][184] "
50340 GOSUB50000:IFPY<>12THEN50340
50350 IF(PX<13)OR(PX>17)THEN50370
50360 YN=1:RETURN
50370 IF(PX<23)OR(PX>26)THEN50340
50380 YN=0:RETURN
50400 REM NAMENSEINGABE
50405 !TP10,11," GIVE NAME FOR SET: "
50410 !TP10,12," [185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185] "
50420 !TP10,13," [146]> "
50430 !TP10,14," [184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184] "
50440 CN$=""
50450 !TF12,13,17,1,32;TP12,13,CN$+"[164]";
50460 WAIT198,63:GETI$:I=ASC(I$):IFI=13THEN50520
50465 IA=IAND96:IF(IA=0)AND(I<>20)THEN50460
50470 IFIATHEN50500
50480 IFCN$=""THEN50460
50490 CN$=LEFT$(CN$,LEN(CN$)-1):GOTO50450
50500 IFLEN(CN$)=16THEN50450
50510 CN$=CN$+I$:GOTO50450
50520 IFCN$<>"$"THENRETURN
50530 !PT43008:PRINT"[147][155]";
50540 !MO0,0;MO1,0:OPEN1,8,0,"$":GET#1,I$,I$:GOTO50550
50545 !JS:IFPEEK(198)>0THENGETI$:PRINTTAB(35)" W ";:GOSUB50800:GETI$
50547 IFI$="X"THEN50580
50548 PRINT
50550 GET#1,I$,I$,I$,J$:IFST>63THEN50580
50555 PRINTASC(I$+CHR$(0))+256*ASC(J$+CHR$(0));
50560 GET#1,I$:PRINTI$;:IFI$<>""THEN50560
50570 GOTO50545
50580 PRINT"[164][164][164][164][164][164][164][164][164][164][164][164][164][164][164]"
50590 PRINT" PRESS ANY KEY[160]"
50595 GOSUB50800:GETI$:!RT43008:CLOSE1:!MO0,1;MO1,1:GOTO50440
50600 REM DISKETTENKANAL ABFRAGEN
50610 OPEN15,8,15:INPUT#15,I1$,I2$,I3$,I4$:CLOSE15
50620 !TP4,16,"[153][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184]"
50625 !TP4,17," [160]DISK MESSAGE : "
50630 !TP4,18," [185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185] "
50640 !TP4,19," [146] "
50650 !TP4,20," [184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184] [155]"
50660 !TP6,19,I1$","I2$","I3$","I4$","
50670 GOSUB50800:GETI$:RETURN
50800 REM WARTEN AUF TASTATURPUFFER
50810 IFPEEK(198)=0THEN:!JS:GOTO50810
50820 RETURN